/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$(document).ready(function(e){
    //this for the menu
    //    $("#homeSubMenu").show("slow").siblings().hide("slow");
    $('.art-hmenu > li > a').removeClass("active");
    $("#instructorSubjectMenu").addClass("active");
//    $('.gen-menu-ul > li > a > span').removeClass("sub-menu-highlight");
//    $(".gen-menu-ul > li > a > #sendRequest").addClass("sub-menu-highlight");
    
});
function evaluateSubject(subjectID){
    $.ajax({
        type: "POST",
        url: "/TCESystem/category/view~active",
        data: {
            'subjectID':subjectID
        }, // serializes the form's elements.
        success: function(data)
        {
            $("#subjectEvaluationDialog").dialog('open');
            var category="";
            for(var index=0; index < data.categoryList.length; index++){
                category+="<p>"+data.categoryList[index].categoryName+"</p><br/>";
            }
            $("#subjectEvaluationDialog").html(category);
        }
    });
}
$.subscribe('getselectedids', function(event,data) {
    var s;
    s = $("#subjectGrid").jqGrid('getGridParam','selarrrow');
    if(s != null && s != ""){
        $("#subjectScheduleIDs").val(s);
        $("#printSubjectForm").submit();
        
    }else{
        promptMessage("#messageDialog", "Please select a subject to print!");
    }
});